/*
 * @Author: 闫聪敏
 * @Email: 
 * @Date: 2020-03-05 16:21:41
 * @Descripttion: 申请入库详情控制器
 */
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { ApplyWareService } from '../apply-ware.service';
import { from } from 'rxjs';
@Component({
  selector: 'app-apply-ware-warehousing-detail',
  templateUrl: './apply-ware-warehousing-detail.component.html',
  styleUrls: ['./apply-ware-warehousing-detail.component.scss']
})
export class ApplyWareWarehousingDetailComponent implements OnInit {

 
  constructor(
    private router: Router,
    private applyWareService: ApplyWareService,
    private activeRouter: ActivatedRoute
  ) { }

  ngOnInit() {
    let infoId = this.activeRouter.snapshot.paramMap.get('id');
    this.GetModel(infoId);
  }
  viewModel = {};
  private GetModel(id) {
    let data = {
      id: id
    }
    this.applyWareService.GetModel(data).subscribe(res => {
      this.viewModel = res;
    });
  }
  Return() {
    history.go(-1);
    // this.router.navigate(['/material/warehouse/applyware']);
  }
}
